package http;

/**
 * @author Karl
 * @Date 2023/1/1 - 20:38
 */
public enum HttpMethod {
    GET,POST,CONNECT,OPTIONS,PUT,DELETE,HEAD;

    public static HttpMethod get(String method){
        method = method.toUpperCase();
        switch (method){
            case "GET": return GET;
            case "POST": return POST;
            case "CONNECT": return CONNECT;
            case "OPTIONS": return OPTIONS;
            case "PUT": return PUT;
            case "DELETE": return DELETE;
            case "HEAD": return HEAD;
        }
        return null;
    }
}
